import React from 'react'
import { Outlet, useNavigate } from 'react-router-dom'

export default function Home() {
    const navigate=useNavigate()
    const toMusicHandle = () => {
        navigate('/main/home/music/?name=xyue&id=001')
    }
    const toNewsHandle = () => {
        navigate('/main/home/music/?name=yuex&id=002')
    }
    return (
        <div>
            <h2> 我是Home的内容</h2>
            <button onClick={toMusicHandle}>Music</button>
            <button onClick={toNewsHandle}>News</button>
            <Outlet />
        </div>
    )
}
